DISCUSSION
The
ATSUCopyAttributes function copies the contents of the style object you pass in the
iSourceStyle parameter into the destination style object, including those style run attribute, font feature, and font variation values that are not set in the source style object. Those style run attributes that are not set in the source style object will be set to the default values listed in
Table C-1 in the destination style object. Those font features and font variations that are not set in the source style object will be set to font-default values in the destination style object.
ATSUCopyAttributes does not copy the contents of memory referenced by pointers or handles within custom style run attributes or within reference constants. You are responsible for ensuring that this memory remains valid until the source style object is disposed of.
To create a copy of the entire contents of a style object, call the function
ATSUCreateAndCopyStyle. To copy style run attributes, font features, and font variations that were previously set in the source style object into the destination style object, regardless of whether or not these values are set in the destination style object, call the function
ATSUOverwriteAttributes. To copy only those style run attributes, font features, and font variations that were previously set in the source style object but not set in the destination style object, call the function
ATSUUnderwriteAttributes.